package com.product.controller;

import com.common.Products;
import com.product.service.ProductService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Author：毕龙
 * Date: 2023/9/2 11:55
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @Resource
    private ProductService productService;

    @RequestMapping("/query/{id}")
    public Products query(@PathVariable Integer id) {
        return productService.selectById(id);
    }


}
